using Coldairarrow.Entity.Base_Manage;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Api.Controllers.SubApp
{
    public interface IUserSyncBusiness
  {
    Task AddDataAsync(UserSyncInputDTO input);
    Task UpdateDataAsync(UserSyncInputDTO input);
    Task DeleteDataAsync(List<string> ids);
    bool CheckExists(string id);

    Task<List<RoleDTo>> GetRoleListAsync();
  }

  public class RoleDTo
  {
     public string Id { get; set; }
    public string RoleName { get; set; }
  }

  [Map(typeof(Base_User))]
  public class UserSyncInputDTO : Base_User
  {
    /// <summary>
    /// 子应用Id
    /// </summary>
    public string AppId { get; set; }

    /// <summary>
    /// 子应用用户Id
    /// </summary>
    public string SubAppUserId { get; set; }

    /// <summary>
    /// 是否超级管理员
    /// </summary>
    public bool IsAdministrator { get; set; }

    /// <summary>
    /// 角色Id
    /// </summary>
    public List<string> RoleIdList { get; set; }
  }
}